#include<iostream>
using namespace std;

class point
{
	private:
		int x,y;

	public:
		point(int vx, int vy){ x = vx; y = vy; }
		point(){x = 0; y = 0;}
		point operator +(point pl);
		point operator -(point p1);
		void print(){
			cout << x << " " << y << "\n";
		}
};

int main()
{
	point p1(50, 40), p2(30, 10);
	p1 = p1 - p2;
	p1.print();
	return 0;
}

point point::operator +(point p1)
{
	point temp(x + p1.x, y + p1.y);
	return temp;
}

point point::operator -(point p1)
{
	point temp(x - p1.x, y - p1.y);
	return temp;
}
